<?php
require_once('Zend/View/Helper/Abstract.php');

class Kbs_View_Helper_Shadow extends Zend_View_Helper_Abstract
{
    static protected $num = 1;

    public function shadow($string, $left = '-2', $top = '-2', $color = 'gray', $type = 'bottom right')
    {
        $html = '';

        $className = 'shadow_' . self::$num;

        $html = '<style type="text/css">' . PHP_EOL 
              . 'span.' . $className . ' {margin:0px 0 0 0px; position:relative;}' . PHP_EOL 
              . 'span.' . $className . ' em {color:' . $color . '; font-style:normal; left:' . $left . 'px; position:absolute; top:' . $top . 'px;}' . PHP_EOL 
              . '</style>' . PHP_EOL;

        switch ($type) {
            case '':
                break;

            default:
                self::$num++;
                $html .= '<span class="shadow">' . $string . '<em>' . $string . '</em></span>';
                break;
        }

        return $html;
    }
}